<div class="site-title">
    <fieldset>
        <legend><a>${title}</a></legend>
    </fieldset>
</div>
<div class="layui-row" style="margin-top: 32px">
    <div class="layui-form" action="">
        <div class="layui-form-item">
            <label class="layui-form-label">日期</label>
            <div class="layui-input-inline">
                <input id="date" type="text" name="date" required lay-verify="required" placeholder="请输入日期"
                       autocomplete="off" class="layui-input" value="<#if isEdit>${vo.date}</#if>">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">标题</label>
            <div class="layui-input-inline">
                <input id="title" type="text" name="title" required lay-verify="required" placeholder="请输入标题"
                       autocomplete="off" class="layui-input" value="<#if isEdit>${vo.title}</#if>">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">内容</label>
            <div class="layui-input-block">
                <textarea id="content" name="desc" placeholder="请输入内容"
                          class="layui-textarea"><#if isEdit>${vo.content}</#if></textarea>
            </div>
        </div>

        <#if current=="company"||current=="news">
        <div class="layui-form-item">
            <label class="layui-form-label">上传类型</label>

            <#if isEdit>
                <div class="layui-input-block">
                    <input type="radio" name="type" value="1" title="图片" <#if vo.type==1>checked</#if>>
                    <input type="radio" name="type" value="2" title="视频" <#if vo.type==2>checked</#if>>
                </div>
                <input type="hidden" id="type" value="${vo.type}">
            <#else >
                <div class="layui-input-block">
                    <input type="radio" name="type" value="1" title="图片" checked>
                    <input type="radio" name="type" value="2" title="视频">
                </div>
                <input type="hidden" id="type" value="1">
            </#if>
        </div>
        </#if>

        <div class="layui-form-item" id="imageUploaderContainer">
            <div class="layui-col-md1">
                <label class="layui-form-label">图片上传</label>
            </div>
            <div class="layui-col-md9 upload-content">
                <div class="content-img">
                    <ul class="content-img-list">
                        <#if isEdit>
                        <#if vo.pictures??>
                            <#list vo.pictures as picture>
                                <li class="content-img-list-item"><img src="/images/${picture}"
                                                                       alt=""><a index="${picture_index}"
                                                                                 class="delete-btn layui-hide"><i
                                                class="layui-icon layui-icon-delete"></i></a>
                                </li>
                            </#list>
                        </#if>
                        </#if>
                    </ul>
                    <div class="file">
                        <i class="layui-icon layui-icon-add-1"></i>上传图片，支持jpg/png<input type="file" name="file"
                                                                                        accept="image/*"
                                                                                        id="imageUploader">
                    </div>
                </div>
                <div class="upload-tips">
                    图片大小限制5M
                </div>
            </div>
        </div>

        <div class="layui-form-item" id="videoUploaderContainer">
            <div class="layui-col-md1">
                <label class="layui-form-label">视频上传</label>
            </div>
            <div class="layui-col-md9 upload-content">
                <div class="content-img">
                    <ul class="content-img-list">
                        <#if isEdit>
                            <#if vo.video?has_content>
                                <li class="content-img-list-item">
                                    <video src="/images/${vo.video}"
                                           controls></video>
                                    <a index="0"
                                       class="delete-btn layui-hide"><i
                                                class="layui-icon layui-icon-delete"></i></a>
                                </li>
                            </#if>
                        </#if>
                    </ul>
                    <div class="file">
                        <i class="layui-icon layui-icon-add-1"></i>上传视频，支持mp4<input type="file" name="file"
                                                                                    accept="video/mp4"
                                                                                    id="videoUploader">
                    </div>
                </div>
                <div class="upload-tips">
                    视频大小限制100M
                </div>
            </div>
        </div>

        <div class="layui-row">
            <div class="layui-input-block layui-col-md8">
                <button class="layui-btn" id="submit-btn">提交</button>
            </div>
        </div>
    </div>
</div>